<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/1
 * Time: 16:01
 */
namespace userManage;

use userManage\core\user;
use userManage\core\VIP1;

require 'core\user.php';
require 'core\VIP1.php';

class main{
    public $arr;

    public function Manager(){
        $arr[]=$this->CreateUser(0);
        $arr[]=$this->CreateUser(0);
        $arr[]=$this->CreateUser(0);
        $arr[]=$this->CreateUser(1);
        echo '总访问人数：'.count($arr);
    }

    public function CreateUser($level){
        switch ($level){
            case 0:
                $user = new user();
                break;
            case 1:
                $user = new VIP1();
                break;
//            case 0:
//
//                break;
//            case 0:
//
//                break;
//            case 0:
//
//                break;
        }

        $user->ShowNowOnline();
        $user->MyLv();
        return $user;
    }

    public function __destruct()
    {
        // TODO: Implement __destruct() method.
        echo '主机页面关闭';
    }
}

$manage = new main();

$manage->Manager();